package com.sk.sourcecircle.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by sk on 2017/12/28.
 */

public  class AlbumaBean implements Parcelable {
    /**
     * album_id : 22
     * user_id : 1
     * rank : ff
     * images : ["https://appdev.qigle.com/yuanquan/public/upload/20171228/1fc4644d0084f4112171cce5920e035b.jpg","https://appdev.qigle.com/yuanquan/public/upload/20171228/c8563801661cd88947dbd271c3f71b59.jpg","https://appdev.qigle.com/yuanquan/public/upload/20171228/d91fc5b51e460ec4fca4e15c1a80559c.jpg","https://appdev.qigle.com/yuanquan/public/upload/20171228/c7d95b3806baf4b33e14f80e17e83970.jpg"]
     * show_auth : 0
     * community_id : 2
     * status : 1
     * create_time : 2017-12-28 00:24:26
     * update_time : 2017-12-28 00:24:26
     * reply_count : 1
     * favorate_count : 0
     * dig_count : 1
     * detail : {"reply":[{"id":14,"user_id":1,"a_id":22,"type":"reply","content":"你哈。","status":1,"update_time":"2017-12-28 12:17:07","create_time":"2017-12-28 12:17:07","nickname":"11","head_url":"https://appdev.qigle.com/yuanquan/public/upload/20171223\\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png"},{"id":13,"user_id":1,"a_id":22,"type":"dig","content":"赞了一下","status":1,"update_time":"2017-12-28 12:16:50","create_time":"2017-12-28 12:16:50","nickname":"11","head_url":"https://appdev.qigle.com/yuanquan/public/upload/20171223\\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png"}],"is_dig":1,"is_favorite":1,"is_friend":0,"nickname":"11","head_url":"https://appdev.qigle.com/yuanquan/public/upload/20171223\\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png","community_name":"测试社群2"}
     */

    private int album_id;
    private int user_id;
    private String rank;
    private int show_auth;
    private String community_id;
    private int status;
    private String create_time;
    private String update_time;
    private int reply_count;
    private int favorate_count;
    private int dig_count;
    private DetailBean detail;
    private List<String> images;
    private boolean isExpand = false;

    public boolean isExpand() {
        return isExpand;
    }

    public void setExpand(boolean expand) {
        isExpand = expand;
    }

    public int getAlbum_id() {
        return album_id;
    }

    public void setAlbum_id(int album_id) {
        this.album_id = album_id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getRank() {
        return rank;
    }

    public void setRank(String rank) {
        this.rank = rank;
    }

    public int getShow_auth() {
        return show_auth;
    }

    public void setShow_auth(int show_auth) {
        this.show_auth = show_auth;
    }

    public String getCommunity_id() {
        return community_id;
    }

    public void setCommunity_id(String community_id) {
        this.community_id = community_id;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public int getReply_count() {
        return reply_count;
    }

    public void setReply_count(int reply_count) {
        this.reply_count = reply_count;
    }

    public int getFavorate_count() {
        return favorate_count;
    }

    public void setFavorate_count(int favorate_count) {
        this.favorate_count = favorate_count;
    }

    public int getDig_count() {
        return dig_count;
    }

    public void setDig_count(int dig_count) {
        this.dig_count = dig_count;
    }

    public DetailBean getDetail() {
        return detail;
    }

    public void setDetail(DetailBean detail) {
        this.detail = detail;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    public static class DetailBean implements Parcelable {
        /**
         * reply : [{"id":14,"user_id":1,"a_id":22,"type":"reply","content":"你哈。","status":1,"update_time":"2017-12-28 12:17:07","create_time":"2017-12-28 12:17:07","nickname":"11","head_url":"https://appdev.qigle.com/yuanquan/public/upload/20171223\\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png"},{"id":13,"user_id":1,"a_id":22,"type":"dig","content":"赞了一下","status":1,"update_time":"2017-12-28 12:16:50","create_time":"2017-12-28 12:16:50","nickname":"11","head_url":"https://appdev.qigle.com/yuanquan/public/upload/20171223\\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png"}]
         * is_dig : 1
         * is_favorite : 1
         * is_friend : 0
         * nickname : 11
         * head_url : https://appdev.qigle.com/yuanquan/public/upload/20171223\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png
         * community_name : 测试社群2
         */

        private int is_dig;
        private int is_favorite;
        private int is_friend;
        private String nickname;
        private String head_url;
        private String community_name;
        private List<ReplyBean> reply;

        public int getIs_dig() {
            return is_dig;
        }

        public void setIs_dig(int is_dig) {
            this.is_dig = is_dig;
        }

        public int getIs_favorite() {
            return is_favorite;
        }

        public void setIs_favorite(int is_favorite) {
            this.is_favorite = is_favorite;
        }

        public int getIs_friend() {
            return is_friend;
        }

        public void setIs_friend(int is_friend) {
            this.is_friend = is_friend;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getHead_url() {
            return head_url;
        }

        public void setHead_url(String head_url) {
            this.head_url = head_url;
        }

        public String getCommunity_name() {
            return community_name;
        }

        public void setCommunity_name(String community_name) {
            this.community_name = community_name;
        }

        public List<ReplyBean> getReply() {
            return reply;
        }

        public void setReply(List<ReplyBean> reply) {
            this.reply = reply;
        }

        public static class ReplyBean implements Parcelable {
            /**
             * id : 14
             * user_id : 1
             * a_id : 22
             * type : reply
             * content : 你哈。
             * status : 1
             * update_time : 2017-12-28 12:17:07
             * create_time : 2017-12-28 12:17:07
             * nickname : 11
             * head_url : https://appdev.qigle.com/yuanquan/public/upload/20171223\f89b1f85f5cb94e399a1c0cb5d5bfdc5.png
             */

            private int id;
            private int user_id;
            private int a_id;
            private String type;
            private String content;
            private int status;
            private String update_time;
            private String create_time;
            private String nickname;
            private String head_url;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getUser_id() {
                return user_id;
            }

            public void setUser_id(int user_id) {
                this.user_id = user_id;
            }

            public int getA_id() {
                return a_id;
            }

            public void setA_id(int a_id) {
                this.a_id = a_id;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getUpdate_time() {
                return update_time;
            }

            public void setUpdate_time(String update_time) {
                this.update_time = update_time;
            }

            public String getCreate_time() {
                return create_time;
            }

            public void setCreate_time(String create_time) {
                this.create_time = create_time;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public String getHead_url() {
                return head_url;
            }

            public void setHead_url(String head_url) {
                this.head_url = head_url;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeInt(this.user_id);
                dest.writeInt(this.a_id);
                dest.writeString(this.type);
                dest.writeString(this.content);
                dest.writeInt(this.status);
                dest.writeString(this.update_time);
                dest.writeString(this.create_time);
                dest.writeString(this.nickname);
                dest.writeString(this.head_url);
            }

            public ReplyBean() {
            }

            protected ReplyBean(Parcel in) {
                this.id = in.readInt();
                this.user_id = in.readInt();
                this.a_id = in.readInt();
                this.type = in.readString();
                this.content = in.readString();
                this.status = in.readInt();
                this.update_time = in.readString();
                this.create_time = in.readString();
                this.nickname = in.readString();
                this.head_url = in.readString();
            }

            public static final Creator<ReplyBean> CREATOR = new Creator<ReplyBean>() {
                @Override
                public ReplyBean createFromParcel(Parcel source) {
                    return new ReplyBean(source);
                }

                @Override
                public ReplyBean[] newArray(int size) {
                    return new ReplyBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.is_dig);
            dest.writeInt(this.is_favorite);
            dest.writeInt(this.is_friend);
            dest.writeString(this.nickname);
            dest.writeString(this.head_url);
            dest.writeString(this.community_name);
            dest.writeList(this.reply);
        }

        public DetailBean() {
        }

        protected DetailBean(Parcel in) {
            this.is_dig = in.readInt();
            this.is_favorite = in.readInt();
            this.is_friend = in.readInt();
            this.nickname = in.readString();
            this.head_url = in.readString();
            this.community_name = in.readString();
            this.reply = new ArrayList<ReplyBean>();
            in.readList(this.reply, ReplyBean.class.getClassLoader());
        }

        public static final Creator<DetailBean> CREATOR = new Creator<DetailBean>() {
            @Override
            public DetailBean createFromParcel(Parcel source) {
                return new DetailBean(source);
            }

            @Override
            public DetailBean[] newArray(int size) {
                return new DetailBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.album_id);
        dest.writeInt(this.user_id);
        dest.writeString(this.rank);
        dest.writeInt(this.show_auth);
        dest.writeString(this.community_id);
        dest.writeInt(this.status);
        dest.writeString(this.create_time);
        dest.writeString(this.update_time);
        dest.writeInt(this.reply_count);
        dest.writeInt(this.favorate_count);
        dest.writeInt(this.dig_count);
        dest.writeParcelable(this.detail, flags);
        dest.writeStringList(this.images);
    }

    public AlbumaBean() {
    }

    protected AlbumaBean(Parcel in) {
        this.album_id = in.readInt();
        this.user_id = in.readInt();
        this.rank = in.readString();
        this.show_auth = in.readInt();
        this.community_id = in.readString();
        this.status = in.readInt();
        this.create_time = in.readString();
        this.update_time = in.readString();
        this.reply_count = in.readInt();
        this.favorate_count = in.readInt();
        this.dig_count = in.readInt();
        this.detail = in.readParcelable(DetailBean.class.getClassLoader());
        this.images = in.createStringArrayList();
    }

    public static final Parcelable.Creator<AlbumaBean> CREATOR = new Parcelable.Creator<AlbumaBean>() {
        @Override
        public AlbumaBean createFromParcel(Parcel source) {
            return new AlbumaBean(source);
        }

        @Override
        public AlbumaBean[] newArray(int size) {
            return new AlbumaBean[size];
        }
    };
}

